home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Trading on the Edge
/
Trading On The Edge - CD-ROM Toolkit (Wayzata Technology)(2031)(1994).bin
/
pc
/
mac_file
/
vendor_d
/
neuralwa
/
nw2v50
/
recirc.nnc
< prev
next >
Wrap
Text File
|
1993-08-23
|
3KB
|
92 lines
csv3.0 !file format is Control Strategy Version 3.0
! Nov-88 (recirc.nnc) Recirculation Network
!************************************************************************
!* *
!* Recirculation Network Control Strategy *
!* *
!* This control strategy assumes the following layers, *
!* geometrically positioned from bottom to top of the screen: *
!* *
!* layer 0: Input Buffer *
!* layer 1: Visible Layer ( same size as input buffer ) *
!* layer 2: Hidden Layer *
!* layer 3: Output Buffer ( same size as input buffer ) *
!* *
!************************************************************************
!
!MASK label op-code operands comment
L_saR_sa trace aux3 ! 1 set trace option to aux3
Li_aRi_a cset recall,1 ! 2 Initialize recall count
!
! Get input
!
L_s_R_s_ ccmp recall,1 ! 3 For step check if 1st time through
L_s_R_s_ bne @step2 ! 4 go to step 2
L_saR_sa lset in ! 5 input layer
L___R_sa io read ! 6 get input data (recall)
L_saR___ io lrnin ! 7 get input data (learn)
!
! Inject input
!
L_saR_sa lset in,1 ! 8 Visible layer
L_saR_sa math set|w=i|output|e=w|fire ! 9 do math, save output
L_saR_sa cadd recall,1 ! 10 recall = 2
L_s_R_s_ br @eos ! 11 end of step
!
! Pass to Hidden layer
!
L_s_R_s_ @step2 ccmp recall,2 ! 12 see if at step 2
L_s_R_s_ bne @step3 ! 13 if not, goto step 3
L_saR_sa lset out,-1 ! 14 hidden layer
L_saR___ math sum|lnoise|tran|output|e=w|fire ! 15
L___R_sa math sum|rnoise|tran|output|e=w ! 16
L_saR_sa io wrstep ! 17 write to userio
L_saR_sa cadd recall,1 ! 18 recall = 3
L_s_R_s_ br @eos ! 19 end of step
!
! Recirculate to visible layer
!
L_s_R_s_ @step3 ccmp recall,3 ! 20 see if at step 3
L_s_R_s_ bne @step4 ! 21 if not, goto step 4
L_saR_sa lset in,1 ! 22 Visible layer
! Do math, output non-regressed value, calculate regressed value
L_saR__ math sum|lnoise|tran|output|e-=w|regress|fire !23
L___R_s_ math sum|rnoise|tran|output|e-=w|regress|fire !24
L___R__a math sum|rnoise|tran|output|e-=w|fire !24 CCK
!
! Feed visible info to output layer
!
L_saR_sa lset out ! 26 output layer
L_saR_sa math sum|tran|output|fire ! 27 do math
!
! Output regressed value
!
L_saR_sa lset in,1 ! 28 Visible layer
L_saR_sa math ce=e|output|fire ! 29 Output regressed value
L_saR_sa io wrstep ! 30 write to userio
L_saR_sa cadd recall,1 ! 31 recall = 4
L_s_R_s_ br @eos ! 32 end of step
!
! feed to hidden layer again ("learn" and "recall step" only)
!
L_s_R_s_ @step4 ccmp recall,4 ! 33 see if at step 4
L_s_R_s_ bne @learn ! 34 if not, do learn
L_saR_s_ lset out,-1 ! 35 Output buffer
L_saR_s_ math sum|lnoise|tran|output|e-=w|fire !36
L_saR_s_ math ce=e ! 37
L_saR_sa cadd recall,1 ! 38 recall = 5
L_s_R_s_ @eos eos ! 39 End of step
!
! learn
!
L_saR___ @learn lset in,1 ! 40 Visible layer
L_saR___ math learn|fire ! 41 Learn
L_saR___ lset out,-1 ! 42 hidden layer
L_saR___ math learn|fire ! 43 Learn
!
! Write output to User I/O
L_saR_sa lset out ! 44 Output layer
L___R_sa io write ! 45 Recall output
L_saR___ io lrnrslt ! 46 Learn output
!LisaRisa trace 0 ! 47 turn off any trace function